package com.w1.security.domain.Vo;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.w1.security.domain.User;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 排行榜Vo
 * @author mingyifan
 * @date 2022-03-08 13:20
 */
@Data
public class PHBListVo {
    private String  id;
    private String qq;
    private String qqname;
    private String username;
    private String email;
    private Long allGames;
    private Long winGames;
    private BigDecimal winPercentage;
    private Integer isJoinRankList;
    private String ipAddress;
    private String ipLocation;
    private String inserUser;
    private Date insertDate;
    private String updateUser;
    private Date updateDate;

    public static List<PHBListVo> trans(List<User> users){
        ArrayList<PHBListVo> Vos = new ArrayList<>();
        for (User user : users) {
            PHBListVo vo = new PHBListVo();

            BeanUtils.copyProperties(user,vo);
            Vos.add(vo);
        }
        return Vos;
    }
}
